package com.zhangfb95.crosschain.server.service.impl;

import com.zhangfb95.crosschain.server.infra.data.mapper.ChainScriptMapper;
import com.zhangfb95.crosschain.server.infra.model.mapper.entity.ChainScript;
import com.zhangfb95.crosschain.server.service.ChainScriptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhangfubing
 * @since 2024/2/5
 */
@Service
public class ChainScriptServiceImpl implements ChainScriptService {

    @Autowired
    private ChainScriptMapper chainScriptMapper;

    @Override
    public int insert(ChainScript chainScript) {
        return chainScriptMapper.insert(chainScript);
    }

    @Override
    public int update(ChainScript chainScript) {
        return chainScriptMapper.updateById(chainScript);
    }

    @Override
    public ChainScript getById(Long id) {
        return chainScriptMapper.selectById(id);
    }
}
